home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15433 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news.cern.ch!danpop
  2. From: danpop@mail.cern.ch (Dan Pop)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: underscore _var ?
  5. Date: 19 Apr 96 00:48:18 GMT
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <danpop.829874898@news.cern.ch>
  8. References: <4l6d3o$ne0@mulga.cs.mu.OZ.AU>
  9. NNTP-Posting-Host: ues5.cern.ch
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=US-ASCII
  12. Content-Transfer-Encoding: 7bit
  13. X-Newsreader: NN version 6.5.0 #18 (NOV)
  14.  
  15. In <4l6d3o$ne0@mulga.cs.mu.OZ.AU> simc@mundil.cs.mu.OZ.AU (Falchion) writes:
  16.  
  17. >What is an underscore at the start of
  18. >a function name or variable supposed 
  19. >to indicate?
  20. >
  21. >eg.    int    _num;
  22. >
  23. >    int    _somefunction();
  24.  
  25. It indicates that the code was written by an ignorant :-)
  26.  
  27. From the C standard:
  28.  
  29.     All external identifiers that begin with an underscore are reserved.
  30.     All other identifiers that begin with an underscore and either an
  31.     upper-case letter or another underscore are reserved.  If the program
  32.     defines an external identifier with the same name as a reserved
  33.     external identifier, even in a semantically equivalent form, the
  34.     behavior is undefined.
  35.  
  36. Dan
  37. --
  38. Dan Pop
  39. CERN, CN Division
  40. Email: danpop@mail.cern.ch 
  41. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  42.